package net.zoneland.greenleaf.timer.task;

import org.apache.log4j.Logger;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import net.zoneland.greenleaf.timer.entity.Sys_schedulejob;

/**
 * 
 * @Description: 计划任务执行处 无状态
 * @author liyi
 * @date 2014年4月24日 下午5:05:47
 */
@DisallowConcurrentExecution
public class QuartzJobFactory implements Job {
	public final Logger log = Logger.getLogger(this.getClass());

	@Override
	public void execute(JobExecutionContext context) throws JobExecutionException {
		Sys_schedulejob scheduleJob = (Sys_schedulejob) context.getMergedJobDataMap().get("scheduleJob");
		TaskUtils.invokMethod( scheduleJob, context );
	}
}